using System;
using System.Collections;
using System.ComponentModel;
using System.Runtime.Serialization;


namespace Entities
{
    [Serializable]
    [System.Data.Services.Common.DataServiceKey("ID")]
    public class Category:EntityBase
    {
        #region Category Properties
        private System.String _CateName;
		[DataMember] public virtual System.String CateName
		{
			get
			{
				return _CateName;
			}
			set
			{
                if (_CateName != value)
                {
                    _CateName = value;
                    OnPropertyChanged("CateName");
                }
			}
		}
        private System.String _ImageURL;
		[DataMember] public virtual System.String ImageURL
		{
			get
			{
				return _ImageURL;
			}
			set
			{
                if (_ImageURL != value)
                {
                    _ImageURL = value;
                    OnPropertyChanged("ImageURL");
                }
			}
		}
        private System.Int32? _CatePos;
		[DataMember] public virtual System.Int32? CatePos
		{
			get
			{
				return _CatePos;
			}
			set
			{
                if (_CatePos != value)
                {
                    _CatePos = value;
                    OnPropertyChanged("CatePos");
                }
			}
		}
        #endregion
        public override bool Equals(object obj)
        {
            if (obj == this) return true;
            if (obj == null) return false;
            if (obj is Category)
            {
                return (this.ID == (obj as Category).ID);
            }
            return false;
        }
        public override int GetHashCode()
        {
            return ID.GetHashCode();
        }
    }
}